
#include <bits/stdc++.h>
using namespace std;
const int MAXN = 50 + 5;
char str[MAXN][MAXN];
int n;

int main() {
    scanf("%d", &n);
    for (int i = 1; i <= n; ++i) {
        int j = n + 1 - i;
        if (i > j)
            break;
        // 涂满 (i,i) - (j,j) 的区域
        char c = (i & 1) ? '#' : '.';
        for (int x = i; x <= j; ++x) {
            for (int y = i; y <= j; ++y) {
                str[x][y] = c;
            }
        }
    }

    for (int i = 1; i <= n; ++i) {
        for (int j = 1; j <= n; ++j)
            printf("%c", str[i][j]);
        puts("");
    }
    return 0;
}